<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>111</title>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <link rel="stylesheet" href="/css/font.css">
    <link rel="stylesheet" href="/css/xadmin.css">
    <!-- <link rel="stylesheet" href="./css/theme5.css"> -->
    <script src="/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        // 是否开启刷新记忆tab功能
        // var is_remember = false;
    </script>
</head>
<body>
<div class="layui-collapse">
    <table class="layui-table" lay-even lay-skin="nob">
        <thead>
            <tr>
                <th>这就是excel表格辣</th>
            </tr>
        </thead>
        <tbody id="excel">

        </tbody>
    </table>
</div>



<script type="text/javascript">
    function frash() {
        var xhr=new XMLHttpRequest();
        xhr.open('get','/excel/List');
        xhr.send();
        xhr.dataType="json"
        xhr.onload=function (){
            var data=JSON.parse(xhr.responseText);
            var filename=data.fileNames;
            var fileAbsolutePaths=data.fileAbsolutePaths;
            console.log(filename)
            console.log(fileAbsolutePaths)
            var html='';
            for(var i=0;i<filename.length;i++){
                html+='<tr><td>'
                html+='<a href="/downloadFile?fileName='+filename[i]+'"  download="'+filename[i]+'">'+filename[i]+'</a>'
                html+='</td></tr>'
            }
            $("#excel").html(html);
        }
    }

    window.onload=frash;//加载数据
</script>
</body>
</html>